/*
 * TsMuxer.h
 *
 *  Created on: 2016年8月24日
 *      Author: zhengboyuan
 */

#ifndef TSMUXER_H_
#define TSMUXER_H_

#include "MediaFormat.h"

namespace av
{


class TsMuxerSink
{
public:
	virtual ~TsMuxerSink() {}

	virtual void writePacket(uint8_t* data, int size, int64_t pts, int flags) =0;

};



class TsMuxer
{
public:
	virtual ~TsMuxer() {}

	virtual int open(const MediaFormat& fmt) =0;

	virtual void close() =0;

	virtual bool isOpen() =0;

	virtual bool write(int type, uint8_t* data, int size, int64_t pts, int duration, int flags) =0;

	virtual void setSink(TsMuxerSink* sink) =0;


};



} /* namespace av */

#endif /* TSMUXER_H_ */
